3.12.20 \(\int \frac {(a+i a \tan (e+f x))^2}{\sqrt {c+d \tan (e+f x)}} \, dx\) [1120]

Optimal. Leaf size=74 \[ -\frac {4 i a^2 \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{\sqrt {c-i d} f}-\frac {2 a^2 \sqrt {c+d \tan (e+f x)}}{d f} \]

[Out]

-4*I*a^2*arctanh((c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2))/f/(c-I*d)^(1/2)-2*a^2*(c+d*tan(f*x+e))^(1/2)/d/f

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {3624, 3618, 65, 214} \begin {gather*} -\frac {2 a^2 \sqrt {c+d \tan (e+f x)}}{d f}-\frac {4 i a^2 \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{f \sqrt {c-i d}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^2/Sqrt[c + d*Tan[e + f*x]],x]

[Out]

((-4*I)*a^2*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]])/(Sqrt[c - I*d]*f) - (2*a^2*Sqrt[c + d*Tan[e + f*x
]])/(d*f)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 3618

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c*(
d/f), Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 3624

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[
d^2*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e
 + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] &&  !LeQ[m, -1] &&  !(EqQ[m, 2] && EqQ
[a, 0])

Rubi steps

\begin {align*} \int \frac {(a+i a \tan (e+f x))^2}{\sqrt {c+d \tan (e+f x)}} \, dx &=-\frac {2 a^2 \sqrt {c+d \tan (e+f x)}}{d f}+\int \frac {2 a^2+2 i a^2 \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx\\ &=-\frac {2 a^2 \sqrt {c+d \tan (e+f x)}}{d f}+\frac {\left (4 i a^4\right ) \text {Subst}\left (\int \frac {1}{\left (-4 a^4+2 a^2 x\right ) \sqrt {c-\frac {i d x}{2 a^2}}} \, dx,x,2 i a^2 \tan (e+f x)\right )}{f}\\ &=-\frac {2 a^2 \sqrt {c+d \tan (e+f x)}}{d f}-\frac {\left (16 a^6\right ) \text {Subst}\left (\int \frac {1}{-4 a^4-\frac {4 i a^4 c}{d}+\frac {4 i a^4 x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{d f}\\ &=-\frac {4 i a^2 \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{\sqrt {c-i d} f}-\frac {2 a^2 \sqrt {c+d \tan (e+f x)}}{d f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 2.14, size = 95, normalized size = 1.28 \begin {gather*} \frac {2 a^2 \left (-\frac {2 i \tanh ^{-1}\left (\frac {\sqrt {c-\frac {i d \left (-1+e^{2 i (e+f x)}\right )}{1+e^{2 i (e+f x)}}}}{\sqrt {c-i d}}\right )}{\sqrt {c-i d}}-\frac {\sqrt {c+d \tan (e+f x)}}{d}\right )}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^2/Sqrt[c + d*Tan[e + f*x]],x]

[Out]

(2*a^2*(((-2*I)*ArcTanh[Sqrt[c - (I*d*(-1 + E^((2*I)*(e + f*x))))/(1 + E^((2*I)*(e + f*x)))]/Sqrt[c - I*d]])/S
qrt[c - I*d] - Sqrt[c + d*Tan[e + f*x]]/d))/f

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 758 vs. \(2 (63 ) = 126\).
time = 0.29, size = 759, normalized size = 10.26

method result size
derivativedivides \(\frac {2 a^{2} \left (-\sqrt {c +d \tan \left (f x +e \right )}-2 d \left (\frac {\frac {\left (i \sqrt {c^{2}+d^{2}}+i c -d \right ) \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c -\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, d -\frac {\left (i \sqrt {c^{2}+d^{2}}+i c -d \right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}}+\frac {\frac {\left (-2 i c^{2} \sqrt {c^{2}+d^{2}}-i d^{2} \sqrt {c^{2}+d^{2}}-2 i c^{3}-2 i c \,d^{2}+c d \sqrt {c^{2}+d^{2}}+c^{2} d +d^{3}\right ) \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (i \sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{2}+i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{3}+i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \,d^{2}-\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c d -\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{2} d -\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, d^{3}+\frac {\left (-2 i c^{2} \sqrt {c^{2}+d^{2}}-i d^{2} \sqrt {c^{2}+d^{2}}-2 i c^{3}-2 i c \,d^{2}+c d \sqrt {c^{2}+d^{2}}+c^{2} d +d^{3}\right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \left (\sqrt {c^{2}+d^{2}}\, c +c^{2}+d^{2}\right )}\right )\right )}{f d}\) \(759\)
default \(\frac {2 a^{2} \left (-\sqrt {c +d \tan \left (f x +e \right )}-2 d \left (\frac {\frac {\left (i \sqrt {c^{2}+d^{2}}+i c -d \right ) \ln \left (d \tan \left (f x +e \right )+c +\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c -\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, d -\frac {\left (i \sqrt {c^{2}+d^{2}}+i c -d \right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}+\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}}+\frac {\frac {\left (-2 i c^{2} \sqrt {c^{2}+d^{2}}-i d^{2} \sqrt {c^{2}+d^{2}}-2 i c^{3}-2 i c \,d^{2}+c d \sqrt {c^{2}+d^{2}}+c^{2} d +d^{3}\right ) \ln \left (d \tan \left (f x +e \right )+c -\sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}+\sqrt {c^{2}+d^{2}}\right )}{2}+\frac {2 \left (i \sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{2}+i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{3}+i \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c \,d^{2}-\sqrt {c^{2}+d^{2}}\, \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c d -\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, c^{2} d -\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, d^{3}+\frac {\left (-2 i c^{2} \sqrt {c^{2}+d^{2}}-i d^{2} \sqrt {c^{2}+d^{2}}-2 i c^{3}-2 i c \,d^{2}+c d \sqrt {c^{2}+d^{2}}+c^{2} d +d^{3}\right ) \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{2}\right ) \arctan \left (\frac {2 \sqrt {c +d \tan \left (f x +e \right )}-\sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}\right )}{\sqrt {2 \sqrt {c^{2}+d^{2}}-2 c}}}{2 \sqrt {2 \sqrt {c^{2}+d^{2}}+2 c}\, \sqrt {c^{2}+d^{2}}\, \left (\sqrt {c^{2}+d^{2}}\, c +c^{2}+d^{2}\right )}\right )\right )}{f d}\) \(759\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/f*a^2/d*(-(c+d*tan(f*x+e))^(1/2)-2*d*(1/2/(2*(c^2+d^2)^(1/2)+2*c)^(1/2)/(c^2+d^2)^(1/2)*(1/2*(I*(c^2+d^2)^(1
/2)+I*c-d)*ln(d*tan(f*x+e)+c+(c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)+(c^2+d^2)^(1/2))+2*(I*(2*(c^
2+d^2)^(1/2)+2*c)^(1/2)*c-(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*d-1/2*(I*(c^2+d^2)^(1/2)+I*c-d)*(2*(c^2+d^2)^(1/2)+2*c
)^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)*arctan((2*(c+d*tan(f*x+e))^(1/2)+(2*(c^2+d^2)^(1/2)+2*c)^(1/2))/(2*(c^2
+d^2)^(1/2)-2*c)^(1/2)))+1/2/(2*(c^2+d^2)^(1/2)+2*c)^(1/2)/(c^2+d^2)^(1/2)/((c^2+d^2)^(1/2)*c+c^2+d^2)*(1/2*(-
2*I*(c^2+d^2)^(1/2)*c^2-I*d^2*(c^2+d^2)^(1/2)-2*I*c^3-2*I*c*d^2+c*d*(c^2+d^2)^(1/2)+c^2*d+d^3)*ln(d*tan(f*x+e)
+c-(c+d*tan(f*x+e))^(1/2)*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)+(c^2+d^2)^(1/2))+2*(I*(c^2+d^2)^(1/2)*(2*(c^2+d^2)^(1/
2)+2*c)^(1/2)*c^2+I*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*c^3+I*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*c*d^2-(c^2+d^2)^(1/2)*(2
*(c^2+d^2)^(1/2)+2*c)^(1/2)*c*d-(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*c^2*d-(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*d^3+1/2*(-2*
I*(c^2+d^2)^(1/2)*c^2-I*d^2*(c^2+d^2)^(1/2)-2*I*c^3-2*I*c*d^2+c*d*(c^2+d^2)^(1/2)+c^2*d+d^3)*(2*(c^2+d^2)^(1/2
)+2*c)^(1/2))/(2*(c^2+d^2)^(1/2)-2*c)^(1/2)*arctan((2*(c+d*tan(f*x+e))^(1/2)-(2*(c^2+d^2)^(1/2)+2*c)^(1/2))/(2
*(c^2+d^2)^(1/2)-2*c)^(1/2)))))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate((I*a*tan(f*x + e) + a)^2/sqrt(d*tan(f*x + e) + c), x)

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 353 vs. \(2 (62) = 124\).
time = 1.11, size = 353, normalized size = 4.77 \begin {gather*} \frac {d \sqrt {-\frac {16 i \, a^{4}}{{\left (i \, c + d\right )} f^{2}}} f \log \left (\frac {{\left (4 \, a^{2} c + {\left ({\left (i \, c + d\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (i \, c + d\right )} f\right )} \sqrt {-\frac {16 i \, a^{4}}{{\left (i \, c + d\right )} f^{2}}} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} + 4 \, {\left (a^{2} c - i \, a^{2} d\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a^{2}}\right ) - d \sqrt {-\frac {16 i \, a^{4}}{{\left (i \, c + d\right )} f^{2}}} f \log \left (\frac {{\left (4 \, a^{2} c + {\left ({\left (-i \, c - d\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-i \, c - d\right )} f\right )} \sqrt {-\frac {16 i \, a^{4}}{{\left (i \, c + d\right )} f^{2}}} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} + 4 \, {\left (a^{2} c - i \, a^{2} d\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a^{2}}\right ) - 8 \, a^{2} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{4 \, d f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

1/4*(d*sqrt(-16*I*a^4/((I*c + d)*f^2))*f*log(1/2*(4*a^2*c + ((I*c + d)*f*e^(2*I*f*x + 2*I*e) + (I*c + d)*f)*sq
rt(-16*I*a^4/((I*c + d)*f^2))*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1)) + 4*(a
^2*c - I*a^2*d)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f*x - 2*I*e)/a^2) - d*sqrt(-16*I*a^4/((I*c + d)*f^2))*f*log(1/2*(
4*a^2*c + ((-I*c - d)*f*e^(2*I*f*x + 2*I*e) + (-I*c - d)*f)*sqrt(-16*I*a^4/((I*c + d)*f^2))*sqrt(((c - I*d)*e^
(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1)) + 4*(a^2*c - I*a^2*d)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f*x
 - 2*I*e)/a^2) - 8*a^2*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))/(d*f)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - a^{2} \left (\int \frac {\tan ^{2}{\left (e + f x \right )}}{\sqrt {c + d \tan {\left (e + f x \right )}}}\, dx + \int \left (- \frac {2 i \tan {\left (e + f x \right )}}{\sqrt {c + d \tan {\left (e + f x \right )}}}\right )\, dx + \int \left (- \frac {1}{\sqrt {c + d \tan {\left (e + f x \right )}}}\right )\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**2/(c+d*tan(f*x+e))**(1/2),x)

[Out]

-a**2*(Integral(tan(e + f*x)**2/sqrt(c + d*tan(e + f*x)), x) + Integral(-2*I*tan(e + f*x)/sqrt(c + d*tan(e + f
*x)), x) + Integral(-1/sqrt(c + d*tan(e + f*x)), x))

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 185 vs. \(2 (62) = 124\).
time = 0.59, size = 185, normalized size = 2.50 \begin {gather*} -\frac {2 \, \sqrt {d \tan \left (f x + e\right ) + c} a^{2}}{d f} + \frac {8 i \, a^{2} \arctan \left (\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{c \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} - i \, \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d - \sqrt {c^{2} + d^{2}} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}}}\right )}{\sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} f {\left (-\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^(1/2),x, algorithm="giac")

[Out]

-2*sqrt(d*tan(f*x + e) + c)*a^2/(d*f) + 8*I*a^2*arctan(2*(sqrt(d*tan(f*x + e) + c)*c - sqrt(c^2 + d^2)*sqrt(d*
tan(f*x + e) + c))/(c*sqrt(-2*c + 2*sqrt(c^2 + d^2)) - I*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d - sqrt(c^2 + d^2)*sq
rt(-2*c + 2*sqrt(c^2 + d^2))))/(sqrt(-2*c + 2*sqrt(c^2 + d^2))*f*(-I*d/(c - sqrt(c^2 + d^2)) + 1))

________________________________________________________________________________________

Mupad [B]
time = 5.91, size = 67, normalized size = 0.91 \begin {gather*} -\frac {2\,a^2\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}}{d\,f}+\frac {a^2\,\mathrm {atan}\left (\frac {\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {-c+d\,1{}\mathrm {i}}}\right )\,4{}\mathrm {i}}{f\,\sqrt {-c+d\,1{}\mathrm {i}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*tan(e + f*x)*1i)^2/(c + d*tan(e + f*x))^(1/2),x)

[Out]

(a^2*atan((c + d*tan(e + f*x))^(1/2)/(d*1i - c)^(1/2))*4i)/(f*(d*1i - c)^(1/2)) - (2*a^2*(c + d*tan(e + f*x))^
(1/2))/(d*f)

________________________________________________________________________________________